﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class SliderLightBehaviourScript : MonoBehaviour {

	public GameObject light;

	// Use this for initialization
	void Start () {
		this.light = GameObject.Find ("Directional Light");
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	public void OnDrag(float value){

        Vector3 light_rotation = new Vector3(value, 45, 0);

		Debug.LogError (light_rotation.x + " " + light_rotation.y);
		this.light.transform.rotation = Quaternion.Euler (new Vector3(light_rotation.x, light_rotation.y,0));
	}
}
